home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / New System Software Extensions / OpenDoc A6 / OpenDoc Parts Framework / OPF / Examples / Draw / Sources / DrawProxyBorder.cpp < prev    next >
Encoding:
Text File  |  1994-04-21  |  2.8 KB  |  98 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                DrawProxyBorder.cpp
  4. //    Release Version:    $ 1.0d1 $
  5. //
  6. //    Author:                Henri Lamiraux
  7. //    Creation Date:        3/28/94
  8. //
  9. //    Copyright:    © 1993, 1994 by Apple Computer, Inc., all rights reserved.
  10. //
  11. //========================================================================================
  12.  
  13. #ifndef DRAWPROXYBORDER_H
  14. #include "DrawProxyBorder.h"
  15. #endif
  16.  
  17. #ifndef DRAWPROXY_H
  18. #include "DrawProxy.h"
  19. #endif
  20.  
  21. #ifndef SHAPES_H
  22. #include "Shapes.h"
  23. #endif
  24.  
  25. #pragma segment drawpart
  26.  
  27. //==============================================================================
  28. // class CDrawProxyBorder
  29. //==============================================================================
  30.  
  31. //------------------------------------------------------------------------------
  32. // CDrawProxyBorder::CDrawProxyBorder
  33. //------------------------------------------------------------------------------
  34.  
  35. CDrawProxyBorder::CDrawProxyBorder()
  36. {
  37. }
  38.  
  39. //------------------------------------------------------------------------------
  40. // CDrawProxyBorder::InitDrawProxyBorder
  41. //------------------------------------------------------------------------------
  42.  
  43. void CDrawProxyBorder::InitDrawProxyBorder(CDrawProxyRun *proxyRun)
  44. {
  45.     InitBaseProxyBorder(proxyRun);
  46.     fProxyRun = proxyRun;
  47. }
  48.  
  49. //------------------------------------------------------------------------------
  50. // CDrawProxyBorder::~CDrawProxyBorder
  51. //------------------------------------------------------------------------------
  52.  
  53. CDrawProxyBorder::~CDrawProxyBorder()
  54. {
  55. }
  56.  
  57. //------------------------------------------------------------------------------
  58. //     CDrawProxyBorder::DrawProxyBorder
  59. //
  60. // Enclosure must be prepared for drawing
  61. //------------------------------------------------------------------------------
  62.  
  63. void CDrawProxyBorder::DrawProxyBorder(FW_CFacet* facet, XMPFacet* embeddedFacet)
  64. {
  65. FW_UNUSED(embeddedFacet);
  66.  
  67.     fProxyRun->GetShape()->DrawShapeHandles(facet, TRUE);
  68. }
  69.  
  70. //------------------------------------------------------------------------------
  71. // CDrawProxyBorder::EraseProxyBorder
  72. //
  73. //    Enclosure must be prepared for drawing
  74. //------------------------------------------------------------------------------
  75.  
  76. void CDrawProxyBorder::EraseProxyBorder(FW_CFacet* facet, XMPFacet* embeddedFacet)
  77. {    
  78. FW_UNUSED(embeddedFacet);
  79.  
  80.     fProxyRun->GetShape()->DrawShapeHandles(facet, FALSE);
  81. }
  82.  
  83. //------------------------------------------------------------------------------
  84. // CDrawProxyBorder::WhereInProxyBorder
  85. //
  86. //    1--5--2
  87. //    |      |
  88. //    8      6
  89. //    |      |
  90. //  3--7--4
  91. //------------------------------------------------------------------------------
  92.  
  93. short CDrawProxyBorder::WhereInProxyBorder(FW_CFacet* facet, const FW_CPoint& mouse) const
  94. {
  95.     return fProxyRun->GetShape()->WhichHandle(facet, mouse);
  96. }
  97.  
  98.